﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using NetWing.Common.Data.SqlServer;

namespace NetWing.BPM.Admin.mjprint
{
    public partial class rzsj : System.Web.UI.Page
    {
        public string mainKeyId = "";
        public DataTable dtmain = null;
        public DataTable dtdetail = null;
        public DataRow depDr = null;//获得部门信息
        public string hth = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            mainKeyId = Request["KeyId"];
            string sqlmain = "select * from MJOrder where KeyId=" + mainKeyId + "";
            dtmain = SqlEasy.ExecuteDataTable(sqlmain);

            depDr = SqlEasy.ExecuteDataRow("select * from Sys_Departments where keyid=" + dtmain.Rows[0]["depid"].ToString() + "");
            string sqldetail = "select * from MJOrderDetail where MJOrderid=" + mainKeyId + " order by KeyId asc";
            dtdetail = SqlEasy.ExecuteDataTable(sqldetail);

            DataRow maindr = SqlEasy.ExecuteDataRow("select * from mjorder where keyid=" + mainKeyId + "");
            hth = maindr["ednumber"].ToString();


        }
    }
}